/*
 * File:    VariableStoreString.java
 * Created: 10-Feb-2009
 * Version: $Id$
 *
 * COPYRIGHT (C) 2009, Bitgate Mobile, LLC.  All Rights Reserved.
 *
 * software@bitgatemobile.com
 */

package com.webplasm.store;

import com.webplasm.store.VariableContainer.VariableType;

public class VariableStoreString extends AbstractVariableStore {
	private String value;
	
	public VariableType getType() {
		return VariableType.STRING;
	}

	@Override
	public boolean isStandard() {
		return true;
	}

	@Override
	public void setValue(Object value) {
		this.value = (String) value;
	}
	
	@Override
	public String getString() {
		return value;
	}
	
	@Override
	public int getInteger() {
		return Integer.parseInt(getString());
	}
	
	@Override
	public double getFloat() {
		return Double.parseDouble(getString());
	}
	
	@Override
	public Object getObject() {
		return value;
	}
	
}